package com.sky.mapper.user;

import com.github.pagehelper.Page;
import com.sky.dto.OrdersPageQueryDTO;
import com.sky.pojo.User;
import com.sky.vo.OrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from user where openid=#{openid};")
    User queryPhone(String openid);

    void insertUser(User user);


    @Select("select * from user where id=#{userId};")
    User selectById(Long userId);

    /**
     * 查询起始时间之前的所有用户数量
     */
    Integer countUserByDate(String day);

    /**
     * 根据时间段查询每日的用户新增数量
     */
    Integer countNewUserByDate(String day);

    Integer countNewUser(String begin, String end);
}
